/*
 * @Description: 预约单创建
 * @Autor: 何兴家
 * @Date: 2020-11-18 09:56:26
 * @LastEditors: 何兴家
 * @LastEditTime: 2021-02-08 11:02:25
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

/**
 * @description: 维修项目列表
 * @param {labourCode  项目代码 labourName  项目名称 itemStatus 启用状态 isUpgrade 是否技术升级 modelLabourCode 车型 oemTag 数据来源 seriesCode  } params
 * @return {*}
 * @author: 何兴家
 */
export const getWxproductList = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairProject/selectAllRepairItemDealer`, {
    params
  });

// 选择备件(库存中)
export const queryRepairInventoryPart = params =>
  axios.get(`${SERVER.DMSCLOUD_PART}/basedata/partStocks/repairFindStock`, {
    params
  });

// 查询预约进厂日期
export const queryPrecontractComeTime = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/queryPrecontractComeTime`, {
    params
  });

// 预约单保存
export const savePrecontractOrder = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/savePrecontractOrder`, params);

// 根据预约单号查询预约单备件及项目信息
export const queryLabourPartsByBookingNo = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/queryPrecontractOrderDetail`, {
    params
  });

// 预约状况查询
export const queryBookCondition = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/queryBookCondition`, {
    params
  });

// 预约单打印
export const printPrecontractOrder = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/printPrecontractOrder`, {
    params
  });
